<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" type="image/x-icon" href="/Public/Home/Support/images/icon_120.ico" media="screen" /> 
<link rel="stylesheet" type="text/css" href="/Public/Home/Support/css/layout.css" media="all" />
<script type="text/javascript" src="/Public/Home/Support/js/jquery-1.7.2.min.js"></script>
<meta name="description" content="E-MBA云 2015年你有啥梦想。梦想是可以有的，万一实现了呢" />
<meta name="keywords" content="E-MBA云" />
<title>E-MBA云 2015年你有啥梦想-登录</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<!-- Mobile Devices Support @begin -->
<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- Mobile Devices Support @end -->
</head>
<body class="body">
     <div class="dream_banner">
    	 <img src="/Public/Home/Support/images/banner1.jpg"/>
    </div>	
    <div class="hello_box">
        <ul class="acitivity">
    		<p>E-MBA云社群携手“圆梦圈”，邀请30000名校友说出自己的梦想！万一实现了呢！</p>
        </ul>
    	<ul class="input">
        	<input type="text" id="user_phone" placeholder="手机号"/>
            <input type="password" id="user_password" placeholder="密码"/>
        </ul>
        <ul class="btn">
            <button type="button" value="" class="pre" onclick="checkLogin();return false;">登录</button>
        </ul>
        <ul class="infor">
        	<div class="">
            	<p>本活动仅对E-MBA云社群用户开放</p>
            </div>
            
        </ul>
        <ul class="hre">
        	<a>前去围观>></a>
        </ul>
    </div>
</body>
<script type="text/javascript">
	function checkLogin(){
		var user_phone = $.trim($("#user_phone").val());
		var user_password = $.trim($("#user_password").val());
		if (user_phone == '' || user_phone == undefined) {
			alert("手机不能为空");
			return false;
		}
		if (user_phone) {
			var reg_phone = /^[0-9]{11}$/;
			if (!reg_phone.exec(user_phone)) {
				alert("请输入正确的手机号码！");
				return false;
			}
		}
		if(user_password == '' || user_password == undefined){
			alert("密码不能为空");
			return false;
		}
		var json_data = {
			user_phone : user_phone,
			user_password : user_password
		};
		$.post("/Index/login/?rand=" + Math.random(), json_data, function(data) {
//console.log(data);
//return false;
			if (data.status == 0) {
				var dream_user_id = "<?php echo ($dream_user_id); ?>";
				if(data.data == 0){
					window.location.href= "/Index/addDream?dream_user_id="+dream_user_id;
				}else{
					window.location.href= "/Support/index?id="+data.data+"&dream_user_id="+dream_user_id;
				}
				
			}else {
				alert(data.info);
			}
			return false;
		}, "json");
	
	}
</script>
</html>